﻿using FluentAssertions;
using NUnit.Framework;
using System;
using System.Collections.Generic;
using System.Linq;
using ApiConceptsFramework;

namespace test.ApiConceptsFramework
{
	[TestFixture]
	public class CostCalculationExtensionsTests
	{
		[Test, Sequential]
		public void CalculateIncrementalComplexity_IncreaseFromIndex1(
			[Values(0,1,2,3,4)] int numberOfItems,
			[Values(0,3,8,15,24)] int expectedResult)
		{
			numberOfItems.CalculateIncrementalComplexity(3, 0, 2, 1).Should().Be(expectedResult);
		}

		[Test, Sequential]
		public void CalculateIncrementalComplexity_IncreaseFromIndex2(
			[Values(0, 1, 2, 3, 4, 5)] int numberOfItems,
			[Values(0, 0, 0, 5, 12, 21)] int expectedResult)
		{
			numberOfItems.CalculateIncrementalComplexity(5, 2, 2, 3).Should().Be(expectedResult);
		}
	}
}
